package com.common.exception;

import com.common.controller.ResultCode;

/**
 * @classDescription:
 * @author:xiayingjie
 * @createTime:16/8/6
 */

public class MyException extends Exception {

    private int code;

    private String msg;
    public MyException(int code,String msg){
        this.code=code;
        this.msg=msg;
    }

    public MyException(ResultCode rc){
        this.code=rc.getCode();
        this.msg=rc.getMsg();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
